package com.exp.base.action;

public class Message {

	/**
	 * 成功
	 */
	private boolean success;
	/**
	 * 返回码
	 */
	private int returnCode;

	/** 
	 * 内容
	 */
	private String returnMessage;
	
	/**
	 * 结构体
	 */
	private Object body;

	public Message(boolean success) {
		this.success = success;
	}

	public Message(boolean success, int returnCode) {
		this.success = success;
		this.returnCode = returnCode;
	}

	public Message(boolean success, String returnMessage) {
		this.success = success;
		this.returnMessage = returnMessage;
	}

	public Message(boolean success, Object body) {
		this.success = success;
		this.body = body;
	}

	public Message(boolean success, int returnCode, String returnMessage) {
		this.success = success;
		this.returnCode = returnCode;
		this.returnMessage = returnMessage;
	}

	public Message(boolean success, int returnCode, String returnMessage, Object body) {
		this.success = success;
		this.returnCode = returnCode;
		this.returnMessage = returnMessage;
		this.body = body;
	}

	
	public boolean isSuccess() {
		return success;
	}

	public Message setSuccess(boolean success) {
		this.success = success;
		return this;
	}

	public int getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(int returnCode) {
		this.returnCode = returnCode;
	}

	public String getReturnMessage() {
		return returnMessage;
	}

	public void setReturnMessage(String returnMessage) {
		this.returnMessage = returnMessage;
	}

	public Object getBody() {
		return body;
	}

	public Message setBody(Object body) {
		this.body = body;
		return this;
	}

	
	
	
}
